Guard against NULL. (#330177, Raphael Slinckx)
authorMatthias Clasen <mclasen@redhat.com>
Fri, 10 Feb 2006 19:19:54 +0000 (19:19 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 10 Feb 2006 19:19:54 +0000 (19:19 +0000)
2006-02-10  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkentrycompletion.c (gtk_entry_completion_match_selected):
Guard against NULL.  (#330177, Raphael Slinckx)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkentrycompletion.c

index 1ccabd795ac008f800442ffcf0abbac4e95fcc42..0e1bbd6ebdc1a1002501dea4624a6e45fd3444cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-10  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_match_selected): 
+       Guard against NULL.  (#330177, Raphael Slinckx)
+
 2006-02-10  Murray Cumming  <murrayc@murrayc.com>
 
         * docs/reference/gtk/tmpl/gtkcomboboxentry.sgml: Mention that 
index 1ccabd795ac008f800442ffcf0abbac4e95fcc42..0e1bbd6ebdc1a1002501dea4624a6e45fd3444cc 100644 (file)
@@ -1,3 +1,8 @@
+2006-02-10  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_match_selected): 
+       Guard against NULL.  (#330177, Raphael Slinckx)
+
 2006-02-10  Murray Cumming  <murrayc@murrayc.com>
 
         * docs/reference/gtk/tmpl/gtkcomboboxentry.sgml: Mention that 
index 7ebfe5b1ebdaa30384e7032dcbc3581175e10a04..e9e923869b4b94d529fc2a2c6c7bf39b8ec43b8f 100644 (file)
@@ -1488,7 +1488,7 @@ gtk_entry_completion_match_selected (GtkEntryCompletion *completion,
   gchar *str = NULL;
 
   gtk_tree_model_get (model, iter, completion->priv->text_column, &str, -1);
-  gtk_entry_set_text (GTK_ENTRY (completion->priv->entry), str);
+  gtk_entry_set_text (GTK_ENTRY (completion->priv->entry), str ? str : "");
   
   /* move cursor to the end */
   gtk_editable_set_position (GTK_EDITABLE (completion->priv->entry), -1);